/*
 * Copyright (C) 2020  FunGuide, Inc. All Rights Reserved.
 */


package com.taiji.order.feign;

import com.taiji.order.model.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 声明需要调用的微服务名称
 *  *  @FeignClient
 *  *      * name : 服务提供者的名称
 *
 * Simple to Introduction
 * className: ProductFeignClient
 *
 * @author yanxw
 * @version 2020/5/6 14:21
 */

@FeignClient(name = "product-service", fallback = ProductFeignClientCallBack.class)
public interface ProductFeignClient {

    @RequestMapping(value = "/product/{id}", method = RequestMethod.GET)
    Product findById(@PathVariable("id") Long id);

}
